﻿@model MvcTasks.ModelView.Tasks.ITasksModelView

@{
    ViewBag.Title = "Index";
}

<div class="panel-info" >
    <h1>Index</h1>
    <p>List of all tasks to do, a product created by me</p>
    
</div>


<div class="row">
   
        <table class="table">
            <tr>
                <th>
                    Title
                </th>
               
                <th>
                    Genre
                </th>
                <th>
                    Priority
                </th>
                <th></th>
            </tr>

            @foreach (var item in Model.Index)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(modelItem => item.Title)
                    </td>
                    
                    <td>
                        @Html.DisplayFor(modelItem => item.Genre)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Priority)
                    </td>
                    <td>
                        @Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
                        @Html.ActionLink("Details", "Details", new { id = item.ID }) |
                        @Html.ActionLink("Delete", "Delete", new { id = item.ID })
                    </td>
                </tr>
            }

        </table>
        
    </div>
